void snakemove(int newdirection, int re)
{
	int i = 0;
	switch (newdirection)
	{
	case 'w':
		for (i = 0; i < snakehead; i++)
		{
			snakeSite[i].x = snakeSite[i + 1].x;
			snakeSite[i].y = snakeSite[i + 1].y;
		}
		snakeSite[snakehead].x -= 1;
		if (re == 1)
		{
			snakehead += 1;
			snakeSite[snakehead].x = snakeSite[snakehead - 1].x - 1;
			snakeSite[snakehead].y = snakeSite[snakehead - 1].y;
		}
		break;
	case 's':
		for (i = 0; i < snakehead; i++) {
			snakeSite[i].x = snakeSite[i + 1].x;
			snakeSite[i].y = snakeSite[i + 1].y;
		}
		snakeSite[snakehead].x += 1;
		if (re == 1)
		{
			snakehead += 1;
			snakeSite[snakehead].x = snakeSite[snakehead - 1].x + 1;
			snakeSite[snakehead].y = snakeSite[snakehead - 1].y;
		}
		break;
	case 'a':
		for (i = 0; i < snakehead; i++) {
			snakeSite[i].x = snakeSite[i + 1].x;
			snakeSite[i].y = snakeSite[i + 1].y;
		}
		snakeSite[snakehead].y -= 1;
		if (re == 1)
		{
			snakehead += 1;
			snakeSite[snakehead].x = snakeSite[snakehead - 1].x;
			snakeSite[snakehead].y = snakeSite[snakehead - 1].y - 1;
		}
		break;
	case 'd':
		for (i = 0; i < snakehead; i++) {
			snakeSite[i].x = snakeSite[i + 1].x;
			snakeSite[i].y = snakeSite[i + 1].y;

		}
		snakeSite[snakehead].y += 1;
		if (re == 1)
		{
			snakehead += 1;
			snakeSite[snakehead].x = snakeSite[snakehead - 1].x;
			snakeSite[snakehead].y = snakeSite[snakehead - 1].y + 1;
		}
		break;
	}
}
